package com.may.wind.entity;

import com.fasterxml.jackson.annotation.JsonIgnoreProperties;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;

import javax.persistence.*;

/**
 * 角色菜单信息
 */
@Entity
@Table(name = "role_menus")
@JsonIgnoreProperties({"handler", "hibernateLazyInitializer"})
@ApiModel(description = "角色菜单信息")
public class RoleMenu {
    @Id
    @SequenceGenerator(sequenceName = "role_menu_sequence", name = "sequence_role_menus", allocationSize = 1)
    @GeneratedValue(strategy = GenerationType.SEQUENCE, generator = "sequence_role_menus")
    @Column(name = "id")
    @ApiModelProperty(name = "id", value = "ID", required = true)
    long id;

    @Column(name = "role_id")
    @ApiModelProperty(name = "roleId", value = "角色ID", required = true)
    long roleId;

    @Column(name = "menu_id")
    @ApiModelProperty(name = "menuId", value = "菜单ID", required = true)
    long menuId;

    public long getId() {
        return id;
    }

    public long getRoleId() {
        return roleId;
    }

    public void setRoleId(long roleId) {
        this.roleId = roleId;
    }

    public long getMenuId() {
        return menuId;
    }

    public void setMenuId(long menuId) {
        this.menuId = menuId;
    }
}
